package com.dao;

import com.dao.provider.EmployeeDaoProvider;
import com.entity.Employee;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

/**
 * @author cj
 * @date 2019/10/14
 */
public interface EmployeeDao {


   @SelectProvider(type = EmployeeDaoProvider.class,method = "getEmpById")
    Employee getEmpById(int id);

    /**
     * 有多个参数时,就必须在dao方法中指定,provider中的方法不需要管参数,不需要设定
     * @param id
     * @param gender
     * @return
     */
    @SelectProvider(type = EmployeeDaoProvider.class,method = "getEmpById2")
    Employee getEmpById2(@Param("id") int id,@Param("gender")int gender);


    @SelectProvider(type = EmployeeDaoProvider.class,method = "getEmpById3")
    Employee getEmpById3(@Param("id") int id,@Param("gender")int gender);


    @SelectProvider(type = EmployeeDaoProvider.class,method = "getEmpById4")
    Employee getEmpById4(@Param("id") int id,@Param("gender")int gender);
}
